import request from '@/utils/request'

// 查询订单记录列表
export function listOrder(query) {
  return request({
    url: '/bg/order/list',
    method: 'get',
    params: query
  })
}

// 查询订单记录详细
export function getOrder(id) {
  return request({
    url: '/bg/order/getById/' + id,
    method: 'get'
  })
}

// 新增订单记录
export function addOrder(data) {
  return request({
    url: '/bg/order/add',
    method: 'post',
    data: data
  })
}

// 修改订单记录
export function updateOrder(data) {
  return request({
    url: '/bg/order/update',
    method: 'put',
    data: data
  })
}

// 删除订单记录
export function delOrder(id) {
  return request({
    url: '/bg/order/delete/' + id,
    method: 'delete'
  })
}

// 导入订单记录
export function importOrder(data) {
    return request({
      url: '/bg/order/import',
      method: 'post',
      data: data
    })
}

// 获取订单统计信息
export function getOrderStatistics() {
  return request({
    url: '/bg/order/statistics',
    method: 'get'
  })
}